# Performance of REST API calls vs direct DB connection using scripts

**URL:** <https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361>\
**Category:** REST API\
**Created:** [September 16, 2014, 12:19pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361 "2014-09-16T12:19:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GowthamSen](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@GowthamSen](https://community.dreamfactory.com/u/GowthamSen)\
**Post date:** [September 16, 2014, 12:19pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/1 "2014-09-16T12:19:26Z")

</div>

Hi,

I am a newbie. I just came to know about dreamfactory which is sounding very good.

I would like to know which one gives better performance in the following:

- Getting data using REST API calls in webapps OR
- Getting data directly using scripts in webapps

Please suggest.

Thanks  
Gowtham

---

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [September 16, 2014, 2:27pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/2 "2014-09-16T14:27:49Z")

</div>

Gowtham,

Could you give some context as to what your application(s) is going to do? If you give me a scenario I can feel out the more efficient method for you.

Thanks,

- Mark

---

<div class="post-metadata">

**Author:** ![GowthamSen](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@GowthamSen](https://community.dreamfactory.com/u/GowthamSen)\
**Post date:** [September 16, 2014, 5:51pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/3 "2014-09-16T17:51:41Z")

</div>

Hi Mark,

Thank you for your reply.

I am trying to build an enterprise oriented SaaS application.

We planned to build using PHP + MySql. After learned about dreamfactory, we are thinking of using html5 + angularJs + REST APIs using dreamfactory.

I would like to know if the performance remains same like normal direct connection based connections vs REST API calls based application.

Please let me know if need additional information.

Looking forward to hear your suggestions.

Thanks  
Gowtham

---

<div class="post-metadata">

**Author:** ![Mark](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mark/32/69_2.png) [@Mark](https://community.dreamfactory.com/u/Mark)\
**Post date:** [September 16, 2014, 5:58pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/4 "2014-09-16T17:58:58Z")

</div>

Gowtham,

Sounds good. As far as comparison between REST and direct connection, latency is about 250 ms. So, very small (almost unnoticeable) difference.

From what you’ve said, it looks like this would be a good fit. I would suggest definitely giving it a try and if you need more info you can always email me direct [mark@dreamfactory.com](mailto:mark@dreamfactory.com).

Thanks,

- Mark

---

<div class="post-metadata">

**Author:** ![GowthamSen](https://avatars.discourse-cdn.com/v4/letter/g/43a26b/32.png) [@GowthamSen](https://community.dreamfactory.com/u/GowthamSen)\
**Post date:** [September 16, 2014, 6:02pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/5 "2014-09-16T18:02:27Z")

</div>

Sure Mark!

Thank you very much for your response.

Could you please share any enterprise applications built using dream factory APIs?

Thanks  
Gowtham

---

<div class="post-metadata">

**Author:** ![billappleton](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/billappleton/32/67_2.png) [@billappleton](https://community.dreamfactory.com/u/billappleton)\
**Post date:** [September 16, 2014, 6:07pm UTC](https://community.dreamfactory.com/t/performance-of-rest-api-calls-vs-direct-db-connection-using-scripts/361/6 "2014-09-16T18:07:09Z")

</div>

Hi Gowtham,

For enterprise examples check out DreamTeam, there are 20,000 companies using in on salesforce, i ported to DSP

This is a rich client app, with 350 + connections to back end SQL DB

Let us know if you have any trouble

[https://github.com/dreamfactorysoftware/app-dreamteam](https://github.com/dreamfactorysoftware/app-dreamteam)

Bill
