# .NET Nest vs HTML 5 RESTful API Performance in big data

**URL:** <https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463>\
**Category:** Elasticsearch\
**Created:** [May 7, 2016, 4:09pm UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463 "2016-05-07T16:09:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohammadRK88](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohammadrk88/32/9654_2.png) [@MohammadRK88](https://discuss.elastic.co/u/MohammadRK88)\
**Post date:** [May 7, 2016, 4:09pm UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463/1 "2016-05-07T16:09:30Z")

</div>

Hi.  
I'm new in elasticsearch. we have a project with a lot of user interaction. Backend of the project is [ASP.NET](http://ASP.NET) MVC and frontend is Angularjs. Backend and Frontend communicate with WEB API.  
We use SQL Server for data storage and we'll use elasticsearch for Search Engine and retrieving data from server.  
Elasticsearch can work upon of Nest and javascript API, is there any difference in performance between Nest and JS API (Specially in very big and complicated queries)?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [May 9, 2016, 2:12am UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463/2 "2016-05-09T02:12:25Z")

</div>

[NEST](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/nest.html), the high level Elasticsearch .NET client, uses Elasticsearch's json REST API through [Elasticsearch.Net](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/elasticsearch-net.html), the low level .NET client, and exposes all of the endpoints with strong types, using [JSON.Net](http://www.newtonsoft.com/json) for serialization.

[Elasticsearch.Net](http://Elasticsearch.Net) itself does not expose endpoints with strong types but can work with `string`, `byte[]`, `object`, and `string`, `byte[]` and `object` collections. It uses a simple json serializer to handle serialization so has no dependencies on any other serialization library.

NEST aims to be a **fast client** that "just works" for any scenario in which you want to use Elasticsearch. _If_ you're using a _limited_ subset of the API, you may be able to improve performance around serialization with custom serializers using something like [JIL](https://github.com/kevin-montrose/Jil), and, if the approach is generic, [we'd love to know](https://github.com/elastic/elasticsearch-net) to see if it could be rolled into NEST. You can write your own json serializer by implementing [`IElasticsearchSerializer`](https://github.com/elastic/elasticsearch-net/blob/9cab2174dd988fb8cf6b440fdd24d32517eab5b0/src/Elasticsearch.Net/Serialization/IElasticsearchSerializer.cs). You may still want to use [Elasticsearch.Net](http://Elasticsearch.Net) or NEST for making the request.

---

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [September 13, 2016, 7:48am UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463/3 "2016-09-13T07:48:22Z")

</div>

Hi,

My product is developed in C# .Net and I'm using [Elasticsearch.Net](http://Elasticsearch.Net) SDK.

My documents are not strongly typed hence I'm not able to use NEST SDK and I'm not able to find reference or sample CRUD operation code for weak-typed (JSON).

Can you please provide me online reference or sample code for CRUD operation?

Thanks in advance.

Regards,  
Sreeram

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [September 13, 2016, 8:10am UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463/4 "2016-09-13T08:10:23Z")

</div>

You can use any object including an anonymous type, to represent your document

Using [Elasticsearch.Net](http://Elasticsearch.Net) low level client

```
var client = new ElasticLowLevelClient();
client.Index<string>("index", "type", new { foo = "foo", bar = 1 });

```

Using the low level client in NEST

```
var client = new ElasticClient();
client.Lowlevel.Index<string>("index", "type", new { foo = "foo", bar = 1 });

```

You can also pass a json string or byte array instead of an object. The `string` generic type parameter indicates the type for the response so in these examples it will be a json string.

[Take a look at the landing page of the github repository](https://github.com/elastic/elasticsearch-net#providing-a-request-body) for more introductory examples and also take a look at [the client documentation.](https://www.elastic.co/guide/en/elasticsearch/client/net-api/index.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:20pm UTC](https://discuss.elastic.co/t/net-nest-vs-html-5-restful-api-performance-in-big-data/49463/5 "2017-07-05T22:20:50Z")

</div>


