Pirata Nervo 8 Posted June 23, 2012 Hey,Do you have any kind of API which outputs jason/XML/HTML/something for character information?I'd like to make a MyBB plugin for DayZ for free but I can't seem to find any information about this. You could argue that the server resources could be exhausted by many connections/queries to the main database. That's right but that information can be cached as it gets queried so that wouldn't be big problem. (Of course having a duplicate DB would be better but that doesn't exist)In a sense there must be a way to grab information about the character, otherwise the game client wouldn't be able to see it (not sure if it's Client<->Main Server or Main Server<->Server<->Client). The information may not be in a desirable format for a web application but could still be grabbed and probably parsed without problems.Thanks. 7 Share this post Link to post Share on other sites
ryan@fantikerz.com 5 Posted June 23, 2012 I would also love a JSON output. Something like stats.dayzmod.com/json/player_id/XXXXXXXXXX would be neat! If it would spit out their kills, infected kills, time alive, deaths, etc., people could make some cool uses of that information.Would that really be considered an API though? Writing a verbose API is both hard and time consuming, from what I understand. Gotta make sure people don't do something nasty! Share this post Link to post Share on other sites
tonic-_- 42 Posted June 23, 2012 Currently there is no such API like feature.At the current point in time I personally don't see such a service becoming available as it could put up the risk of a performance hit to the central database where DayZ character data is stored and if the database server takes a performance hit it could disrupt and degrade DayZ game play.Maybe in the future we can offer such a service but at the current point in time no such feature is available. Share this post Link to post Share on other sites
Lukio (DayZ) 24 Posted June 23, 2012 You probably wouldn't want the XML files coming directly from the database mirror, something like an hourly extraction of the data and hosting it on a different server would be necessary. I don't think anyone wants realtime data. Share this post Link to post Share on other sites
IceD 1 Posted June 23, 2012 Hey' date='Do you have any kind of API which outputs jason/XML/HTML/something for character information?I'd like to make a MyBB plugin for DayZ for free but I can't seem to find any information about this. You could argue that the server resources could be exhausted by many connections/queries to the main database. That's right but that information can be cached as it gets queried so that wouldn't be big problem. (Of course having a duplicate DB would be better but that doesn't exist)In a sense there must be a way to grab information about the character, otherwise the game client wouldn't be able to see it (not sure if it's Client<->Main Server or Main Server<->Server<->Client). The information may not be in a desirable format for a web application but could still be grabbed and probably parsed without problems.Thanks.[/quote']Pretty much copy of Eve online... Think of something else imo 1 Share this post Link to post Share on other sites
Pirata Nervo 8 Posted June 23, 2012 Hey' date='Do you have any kind of API which outputs jason/XML/HTML/something for character information?I'd like to make a MyBB plugin for DayZ for free but I can't seem to find any information about this. You could argue that the server resources could be exhausted by many connections/queries to the main database. That's right but that information can be cached as it gets queried so that wouldn't be big problem. (Of course having a duplicate DB would be better but that doesn't exist)In a sense there must be a way to grab information about the character, otherwise the game client wouldn't be able to see it (not sure if it's Client<->Main Server or Main Server<->Server<->Client). The information may not be in a desirable format for a web application but could still be grabbed and probably parsed without problems.Thanks.[/quote']Pretty much copy of Eve online... Think of something else imoI don't know what the hell is Eve but if you're here just to accuse me of making comparisons with other games, just get the hell out of this thread. I'm not here to argue with other people and being accused like many others of being a CoD player, a Wow player and now a "eve player". I never played WoW or Eve, so you better stop there.If I misunderstood your post, I apologize. 1 Share this post Link to post Share on other sites
Flexserve 4 Posted June 27, 2012 "central database where DayZ character data is stored" - Tonic This is why performance is poor. When can the hosts get their own DB's that batch out to the main evry 15 minutes or so?? It'll stop disco and reconnect cheats. Make life more valuable than, "Oh well, I'll just server hop!" And a reconnect at the same server would be instant! You would only need to have a possible wait every 15 minutes IF you wanted to hop servers! Central DB seems like a very crude way to do this considering I do not think your infastructure is anything like most MMO's out there. (Not saying Dayz is an MMO, however the player volume reporting to the Central DB is growing substantially!)Pardon my spelling but I am scratching my head over this one and yelling out "Herp Derp" Share this post Link to post Share on other sites
hivemind (DayZ) 3 Posted June 29, 2012 MMO's out there. (Not saying Dayz is an MMO' date=' ... )[/quote']MMO means Massively Multiplayer Online. I think it qualifies as that. 1 Share this post Link to post Share on other sites
Haba (DayZ) 0 Posted June 29, 2012 Really? Character stats are available in many games now, not just Eve Online. I for one would love this feature if the dev team can put something together for it, and I think an extraction of data to XML format would be awesome and not compromise security of the DB in any way. Share this post Link to post Share on other sites
demine0 43 Posted June 29, 2012 "central database where DayZ character data is stored" - Tonic This is why performance is poor.Performance isn't poor because of it being a single database server. The database isn't even breaking a sweat at peak times. It's mostly limitations in the ARMA II engine that causes performance issues.A majority of the server load and bandwidth is actually between the DayZ Game server and the player. The amount of traffic between the Game Server and Central database is much smaller.When can the hosts get their own DB's that batch out to the main evry 15 minutes or so?? It'll stop disco and reconnect cheats. Make life more valuable than' date=' "Oh well, I'll just server hop!" And a reconnect at the same server would be instant! You would only need to have a possible wait every 15 minutes IF you wanted to hop servers! Central DB seems like a very crude way to do this considering I do not think your infastructure is anything like most MMO's out there. (Not saying Dayz is an MMO, however the player volume reporting to the Central DB is growing substantially!)Pardon my spelling but I am scratching my head over this one and yelling out "Herp Derp"[/quote']Allowing servers to run their own private database fixes nothing. It would eliminate cross server persistency, and that's not something you want. What happens when the guy paying for your DayZ server decides he doesn't want to shell out the cash anymore, or the admin crashes the box? You'll lose your character for good. On a private hive, your at the mercy of that server admin.Allowing a "Caching" database of some type that works with our central database would require an overhaul that would take a substantial amount of time(Time away from feature releases), and opens up a whole new side of things that hackers can do shitty things with. It's too easy to server owners to write their own invalid data into the database. It's also another large chunk of DayZ that we would need to maintain.DayZ is still in heavy development, so the database is CONSTANTLY changing. Once those changes calm down, we may put an API on the roadmap. It's too early to know right now though. 7 Share this post Link to post Share on other sites
straylight 0 Posted June 29, 2012 Deleting my post, The Dev said it better than I ever could.-Stray Share this post Link to post Share on other sites
Ander (DayZ) 530 Posted June 29, 2012 A bit of an update.A future API is definately possible. There are methods that I've looked at that would make it effecient and not affect DB at all.This is however not a priority just yet. We'll make the infrastructure (everything from and including client to backend) a bit more robust.*selfproclaimed lead dba / infra-dev* :) 3 Share this post Link to post Share on other sites
LT.Sacred 9 Posted June 30, 2012 I'm glad Alex knows what he's doing ^^ lol Share this post Link to post Share on other sites
Method (DayZ) 5 Posted July 8, 2012 Performance isn't poor because of it being a single database server. The database isn't even breaking a sweat at peak times. It's mostly limitations in the ARMA II engine that causes performance issues.If it isn't breaking a sweat even at peak times why would you have to disable logging and data mining services? Share this post Link to post Share on other sites
Vipeax 318 Posted July 8, 2012 IO load was an issue at the time, that's long gone. Currently we are talking about sub 10% CPU load at peak times with the whole DB loaded into memory. The way it all works currently the Hive is only really causing delays when you load in, as that's the only transaction that goes both ways. A few patches ago it caused desyncs due to the fact that the server was waiting for a reply. Let's not get into too much detail, but currently most of the server-performance issues are cleanup of objects-related issues. Which Dean has spent a lot of time on for 1.7.2.,.. Share this post Link to post Share on other sites
tomfin 25 Posted July 11, 2012 This was touched upon at the Rezzed talk last week; something very like that data may become part of the DayZ website. Here's a link to the relevant section of the video: It's not an API per se but once those player profiles are available you could potentially scrape that data directly from the HTML. On the other hand, those profiles look pretty enticing and could offer sig-style stats for use on other forums. You may be reinventing the wheel by the time they roll around.Would also like to see an API, but take your time. Seems there are plenty irons in the fire already. 1 Share this post Link to post Share on other sites
pepperkorn@gmail.com 94 Posted July 11, 2012 It wouldn't be THAT bad of a performance hit if you have a legit database server and use stored procedures.. or somehow cache stats that only get updated every hour or so. Share this post Link to post Share on other sites
clodan 0 Posted July 11, 2012 Currently there is no such API like feature.At the current point in time I personally don't see such a service becoming available as it could put up the risk of a performance hit to the central database where DayZ character data is stored and if the database server takes a performance hit it could disrupt and degrade DayZ game play.Maybe in the future we can offer such a service but at the current point in time no such feature is available.Man, what kind of machine do u use to host DayZ? for christ... if u have so many players just buy a fucking Mainframe... problem solved! Share this post Link to post Share on other sites
vekien 84 Posted July 11, 2012 If an API was to be made, it would likely be based on a cache result, thus never interacting to the database itself. I think it would also be ID restricted, the other issue you have is to protect privacy and such. (personal opinion) Share this post Link to post Share on other sites
umishak 3 Posted July 11, 2012 (edited) If i had read access I would create and host polite API proxy.But there is one issue with API, players with high value items could be targeted. Fetching info about all players on server and getting api results could lead to really useful intel and thus changing meta game - hunting players. Bad in my opinion because of out of game provided information is simply out of game. Just alive time alone, zombies killed or murder count could be hinting how valuable stuff player has or help to decide if is worth hunting.So i really don't know if API is even desired. Probably public html profiles for players to boast as i saw on Rezzed video but these could be scraped and used against player so privacy/only trusted survivors option will be necessary public option for noobs would be ok i guess. Edited July 11, 2012 by mishak 3 Share this post Link to post Share on other sites
deltaforce11 29 Posted July 11, 2012 If an API was to be made, it would likely be based on a cache result, thus never interacting to the database itself. I think it would also be ID restricted, the other issue you have is to protect privacy and such. (personal opinion)+1. Security is paramount! :) Share this post Link to post Share on other sites
mbainrot 4 Posted July 16, 2012 Easiest way to maintain environment security and central database performance is to do data pushes to a mirror server/cloud host.(begin ramble)E.g. public do not connect to the main db, the main db has a cronjob (if linux) or scheduled task (windows) that runs every hour. When it runs it pushes a dump of the data (excl: xxx inventories (players, tents, vehicles, etc)) to a cloud host or beefy load balanced web cluster (to handle the load of potentially half a million people * 32 (lots of fat to allow for some people doing uncached, dynamic signatures on busy forums, posting popular threads)). The format of the data could be csv, xml, etc to allow for off server processing (thus reducing the load on the server as most load a game stats server would see would be database transactional load caused by queries)I know this is a hell of an ask (and I am expecting to be shot down, flame grilled to death and put on a kabab by the community) is it at all possible for the community to be provided with the database schema (e.g. structure) and example data (or real data with the squishy bits removed) with the purpose of encouraging someone to develop a dump script (obviously as plain text or as a binary with source code for all binary elements for obvious reasons...) thus lightening the load on the devs/encouraging community participation?(/end ramble)My question is kinda vague as I don't know how it all is stored (al be it flat file (plausible), sqlite, mysql/mssql (most likely), oracle (plausible but unlikely), some unknown propriety format, etc) Share this post Link to post Share on other sites
vekien 84 Posted July 16, 2012 Hey @mbainrot, Some good notes, we are quite aware of how to handle this but there is still a lot up for discussion internally about whether this will happen and what kind of support would be given for it. Right now there are bigger priorities being worked on, so I wouldnt expect to be able to hook via web platform to generate your data signatures just yet.As DayZ is constantly updating and changing rapidly in the background, it is very difficult to host an fetch API right now as it would require updating a lot of the time and we cant exactly allow people to view the database with open eyes! (personal opinion there).In my opinion, it will be heavily cached datasets, there will be no direct database access or anything that can be queried to the database. It would be an API that handles pre-cached (over periodic times) data. This means data load is not a problem as it can takes a fraction of a second to complete. 1 Share this post Link to post Share on other sites
Doctor_sloth 119 Posted July 16, 2012 I am so fucking lost it's pathetic. Can someone explain this to me, pretending that I am about as computer illiterate as can be, and then stop pretending. Thanks! 1 Share this post Link to post Share on other sites