Is it possible to develop my own rest service using arcgis , so that i can give the data to my map the way i wish rather than relying on esri for this.
Check Server Object Extensions (SOE) first if you can get what you want with that. "Server object extensions (SOEs) allow you to extend the base functionality of ArcGIS for Server. Most SOEs do this by using ArcObjects code to work with GIS data and maps. ArcObjects are the core components on which ArcGIS is built and allow you the most flexibility in writing GIS functions." http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000004s5000000
If not, then can you describe your case/target in more detail?